<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>管理员主页</title>
  <link rel="stylesheet" href="../static/bootstrap/css/bootstrap.min.css"
    th:href="@{/static/bootstrap/css/bootstrap.min.css}" />
  <link rel="stylesheet" href="../static/css/global.css" th:href="@{/static/css/global.css}" />
  <link rel="stylesheet" href="../static/css/patient.css" th:href="@{/static/css/patient.css}" />
</head>

<body>
  <!-- 弹窗组件 -->
  <div th:replace="reuse/alertBox::alertBox"></div>
  <!-- 导航栏 -->
  <nav th:fragment="adminHomeNav" class="navbar navbar-expand-lg bg-body-tertiary rounded py-3 position-fixed w-100">
    <div class="container-fluid">
      <a class="navber-brand logolink" th:href="@{/admin}">
        <img th:src="@{/static/img/hospital-logo.svg}" alt="hospital" width="36" height="36" />
        <strong class="">管理员系统</strong>
      </a>
      <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarScroll"
        aria-controls="navbarScroll" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
      </button>
      <div class="collapse navbar-collapse" id="navbarScroll">
        <ul class="navbar-nav me-auto my-2 my-lg-0 navbar-nav-scroll" style="--bs-scroll-height: 100px">
          <li class="nav-item me-4">
            <a class="nav-link text-dark" href="/admin/medRecManage">病历管理</a>
          </li>
          <li class="nav-item me-4">
            <a class="nav-link text-dark" href="/admin/patientManage">患者管理</a>
          </li>
          <li class="nav-item me-4">
            <a class="nav-link text-dark" href="/admin/doctorManage">医师管理</a>
          </li>
          <li class="nav-item me-4">
            <a class="nav-link text-dark" href="/admin/adminManage">内部管理</a>
          </li>
          <li class="nav-item me-4">
            <a class="nav-link text-dark" href="#">药品管理</a>
          </li>
          <li class="nav-item me-4">
            <a class="nav-link text-dark" th:href="@{/admin/accountInfo}">账号变动</a>
          </li>
        </ul>
        <div class="d-flex">
          <div class="me-2 text-primary-emphasis">
            <span th:text="${session.userSection}"> 所属部门 </span>
          </div>
          <div class="text-info-emphasis">
            <span th:text="${session.userName}"> 账号级别 </span>
          </div>
        </div>
      </div>
    </div>
  </nav>
  <!-- 子组件切换 -->
  <div th:replace="${page}=='adminManage'?~{admin/adminManage::adminManage}:~{::content}"></div>
  <div th:replace="${page}=='medRecManage'?~{admin/medRecManage::medRecManage}:~{::content}"></div>
  <div th:replace="${page}=='patientManage'?~{admin/patientManage::patientManage}:~{::content}"></div>
  <div th:replace="${page}=='doctorManage'?~{admin/doctorManage::doctorManage}:~{::content}"></div>
  <div th:replace="${page}=='accountChange'?~{admin/accountChange::accountChange}:~{::content}"></div>
  <div th:fragment="content"></div>
  <script src="../static/bootstrap/js/bootstrap.bundle.min.js"
    th:src="@{/static/bootstrap/js/bootstrap.bundle.min.js}"></script>
</body>

</html>